<?php 
$this->pageTitle = Yum::t('Password recovery');

$this->breadcrumbs = array(
    Yum::t('Login') => Yum::module()->loginUrl,
    Yum::t('Restore'));

?>

<?php $activeform = $this->beginWidget('CActiveForm', array(
			'id'=>'recovery-form',
			'enableAjaxValidation'=>true,
			'enableClientValidation'=>true,
			'focus'=>array($form,'login_or_email'),
			));
?>
<?php if (Yum::hasFlash()) {
    echo '<div class="success">';
    echo Yum::getFlash();
    echo '</div>';
} else {
    echo '<h2>' . Yum::t('Password recovery') . '</h2>';
    ?>

<div class="form">

    <div class="line"></div>
    <?php echo Yum::requiredFieldNote(); ?>
    <?php echo CHtml::errorSummary(array($form)); ?>

    <div class="row">
        <?php echo CHtml::activeLabelEx($form, 'login_or_email'); ?>
        <?php echo CHtml::activeTextField($form, 'login_or_email') ?>
        <p class="hint"><?php echo Yum::t("Please enter your user name or email address."); ?></p>
    </div>


<?php if(extension_loaded('gd')
			&& Yum::module('registration')->enableCaptcha): ?>
	<div class="row center">
        <div class="center_child">
		<?php /*echo CHtml::activeLabelEx($form,'verifyCode'); */?>

		<div>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo CHtml::activeTextField($form,'verifyCode',array('style'=>'margin-left: 310px;')); ?>
		</div>
		<p class="hint">
		<?php echo Yum::t('Please enter the letters as they are shown in the image above.'); ?>
		<br/><?php echo Yum::t('Letters are not case-sensitive.'); ?></p>
        </div>
	</div>
	<?php endif; ?>

        <div class="row center">
        <div class="button" style="float: none;">
            <?php echo CHtml::divAsLink(Yum::t('Restore'),
                                        'javascript:document.forms["recovery-form"].submit();', '', '', '');?>
        </div>

    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->
<?php } ?>
